<!DOCTYPE html>
<html lang="en">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
      name="viewport">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">
<title>大区意向客户列表App</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/dist/css/oa-app.css">
<head>
    <style>
        .oa-tab-small{
            top:0;
        }
    </style>
</head>
<body>
<div id="app" v-cloak>
    <div class="oa-tab-small">
        <span v-for="(item,i) in list" :class="selectIndex==i? 'tabActive':'tabNo'" @click="selectIndex=i;" style="display: inline-block">
            <span class="oa-name" @click="getDetail(item.id)">{{item.name}}</span>
        </span>
    </div>
    <iframe id="gzbg" style="width: 100%;margin-top: 35px;height: 850px" src="/page/reportForm/newReportForm/districtManagerReportForm/daQuIntentionalListNewApp.html?userId2=+userId2+&dateTime=+dateTime+" frameborder="0"></iframe>
</div>
<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script src="https://file.ggxqce.com/web/axios.min.js"></script>
<script src="/dist/js/newOaApp.js"></script>
<script type="text/javascript">
    var app = new Vue({
        el: '#app',
        data: {
            selectIndex:0,
            userId: getUrlParamObj().userId,
            dateTime:new Date().Format("yyyy-MM-dd"),
            lat:getUrlParamObj().lat,
            lng:getUrlParamObj().lng,
            status:getUrlParamObj().status,
            isZongJian:getUrlParamObj().isZongJian,
            departId:getUrlParamObj().departId,
            companyId:getUrlParamObj().companyId,
            userId2:'',
            list:[],
        },
        methods: {
            getList:function(){
                var that = this;
                axios.post(urlConfig.newReportForm.getChildByUserId, {
                    "userId":that.userId
                })
                    .then(function (data) {
                        that.list = data.results;
                        that.userId2 = that.list[0].id;
                        var ifrem = document.getElementById("gzbg");
                        ifrem.setAttribute('src',"/page/reportForm/newReportForm/districtManagerReportForm/daQuIntentionalListNewApp.html?userId="+that.userId2+"&dateTime="+that.dateTime);
                    })
            },
            hideLoading: function () {
                JSBridge.call(UI, 'hideLoading')
            },
            showLoading: function () {
                var that = this
                var param = {
                    cancelable: false
                }
                JSBridge.call(UI, 'showLoading', param)


            },
            setPullRefresh: function (isOpen) {
                var param = {
                    pullRefresh: isOpen, //是否开启原生下拉刷新
                }
                JSBridge.call(UI, 'setPullRefresh', param)
            },
            getDetail:function(userId,i){
                var that =this;
                that.userId2 = userId;
                var ifrem = document.getElementById("gzbg");
                ifrem.setAttribute('src',"/page/reportForm/newReportForm/districtManagerReportForm/daQuIntentionalListNewApp.html?userId="+that.userId2+"&dateTime="+that.dateTime);
                console.log(that.userId2)

            }

        },
        mounted: function () {
            var that = this ;
            that.getList();
            that.setPullRefresh(true);
        }
    })
</script>

</body>
</html>